﻿using System.Configuration;

namespace AppFx.BizTalk.Diagnostics.Telemetry
{
    public class TelemetryClientCollection : ConfigurationElementCollection
    {
        public TelemetryClientElement this[int index]
        {
            get { return (TelemetryClientElement)BaseGet(index); }
        }

        public new TelemetryClientElement this[string key]
        {
            get { return (TelemetryClientElement)BaseGet(key); }
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new TelemetryClientElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((TelemetryClientElement)element).Name;
        }
    }
}

